{extend name="public/base" /}

<!--尾部-->

<!--返回顶部-->
{block name="content"}
{__block__}
<input type="hidden" name="mun_url" id="mun_url" value="7.2"/>
<script src="../../static/uedi/ueditor.config.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/uedi/ueditor.all.js" type="text/javascript" charset="utf-8"></script>
				<div class="c-r right">
					<div class="label1">
						<div class="title">
							添加图片
						</div>
						<div class="form" id="form">
							<form action="editer" method="post" enctype="multipart/form-data">
								<input type="hidden" name="bid" value="{$data.bid}" />
								<div><label class="ltxt">名称:</label><input type="text" name="name" id="" value="{$data.name}" /><span></span></div>

								<!--<div><label class="ltxt">logo:</label><input type="text" name="" id="" value="" /><span></span></div>-->

								<div><label class="ltxt">地址:</label><input type="text" name="address" id="" value="{$data.address}" /><span></span></div>

								<div><label class="ltxt">客服电话:</label><input type="text" name="phone" id="" value="{$data.phone}" /><span></span></div>

								<div>
									<label class="ltxt">logo图片上传:</label><img src="{$data.logo}"  style="width: 100px;height: 100px"/><input type="file" name="image" id="" value="" /><span></span>
								</div>


								<!--<div>-->
									<!--<label class="ltxt">图片上传:</label>-->
									<!--<div class="img-box full">-->
										<!--<section class=" img-section">-->
											<!--<div class="z_photo upimg-div" >-->
									               	 <!--<section class="z_file fl">-->
									               	 	<!--<img src="../../static/home/img/a11.png" tppabs="http://www.jq22.com/demo/imgUp201703281022/img/a11.png" class="add-img">-->
									               	 	<!--<input type="file" name="image" id="file" class="file" value="" accept="image/jpg,image/jpeg,image/png,image/bmp" multip />-->
									               	 <!--</section>-->
									               	  <!--<div class="clear"></div>-->
									         <!--</div>-->
										 <!--</section>-->
									<!--</div>-->
									<!--<span></span>-->
								<!--</div>-->
						        <!--<aside class="mask works-mask">-->
									<!--<div class="mask-content">-->
										<!--<p class="del-p">您确定要删除作品图片吗？</p>-->
										<!--<p class="check-p"><span class="del-com wsdel-ok">确定</span><span class="wsdel-no">取消</span></p>-->
									<!--</div>-->
								<!--</aside>-->

								<div><label class="ltxt">内容:</label>

									<!-- 加载编辑器的容器 -->
									<script id="container" name="content" type="text/plain">{$data.content}</script>
									<!-- 配置文件 -->
									<script type="text/javascript" src="ueditor.config.js"></script>
									<!-- 编辑器源码文件 -->
									<script type="text/javascript" src="ueditor.all.js"></script>
									<!-- 实例化编辑器 -->
									<script type="text/javascript">
                                        var ue = UE.getEditor('container');
									</script>
								</div>

								<div><button class="btns btn-right btns">保存</button><button class="cancel" onclick="history.go(-1)">取消</button></div>
								<div class="clear"></div>
							</form>
						</div>
					</div>
				</div>
				<!--<div id="main" style="width: 600px;height:400px;"></div>-->
<script>
    $(document).ready(function(e) {
        var ue = UE.getEditor('container');
        $('input').lc_switch();
    });
    $(".btns").click(function() {
        if ($('.form input[name="name"]').val() == '') {
            prompt('名称不能为空', 0)
            return false
        }else if ($(".form input[name='address']").val() == '' ){
            prompt('地址不能为空', 0)
            return false
        }else if($('.form input[name="phone"]').val() == ''){
			prompt('客服电话不能为空', 0)
			return false
    	}else if($('.form input[name="image"]').val() == ''){
            prompt('上传图片不能为空', 0)
            return false
        }
    });
	$(function(){
		$("#file").takungaeImgup({
			formData: { "path": "Content/Images/", "name": "uploadpic" }, //path参数会发送给服务器，name参数代表上传图片成功后，自动生成input元素的name属性值
			url: "data/page.json",    //发送请求的地址，服务器地址
			success: function (data) {

			},
			error: function (err) {
				alert(err);
			}
		});
	})
    $.ajax({
		type:"get",
		url:"data/page.json",
		async:true,
		success: function(data){
			console.log('success')
		}

	});
</script>
{/block}














